using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Joy.Erp.BasicArchives.Core.Filters;

namespace Joy.Erp.BasicArchives.Production
{
    public interface IProductionOrderAppService
    {
        Task<ProductionOrderDto> GetAsync(Guid id);
        Task<ProductionOrderPreparationDto> GetChildAsync(Guid id);
        Task<ProductionOrderDto> FindAsync(string filter);
        Task<ProductionOrderDto> FindBySourceKeyAsync(string sourceKey, string sourceType);
        Task<PagedResultDto<ProductionOrderDto>> GetListAsync(FilterRequestDto input);
        Task<PagedResultDto<ProductionOrderDto>> QueryAsync(FilterGroupRequestDto input);
        Task<PagedResultDto<ProductionOrderPreparationDto>> QueryChildrenAsync(FilterGroupRequestDto input);
        Task<ProductionOrderDto> CreateAsync(ProductionOrderCreateDto input);
        Task<ProductionOrderDto> UpdateAsync(Guid id, ProductionOrderUpdateDto input);
        Task<ProductionOrderDto> SubmitAsync(Guid id);
        Task<ProductionOrderDto> ApproveAsync(Guid id);
        Task<ProductionOrderDto> UnApproveAsync(Guid id);
        Task DeleteAsync(Guid id);
        Task<List<ProductionOrderDto>> BatchCreateAsync(List<ProductionOrderCreateDto> inputs, bool useBulk = false);
        Task<List<ProductionOrderDto>> BatchUpdateAsync(List<ProductionOrderBatchUpdateDto> inputs, bool useBulk = false);
        Task BatchDeleteAsync(List<Guid> ids, bool useBulk = false);
    }
}